-
Notifications
You must be signed in to change notification settings - Fork 14k
Support signed integers and char in v0 mangling
#77554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
varkor
commented
Oct 4, 2020
Contributor
Author
|
Blocked on rust-lang/rustc-demangle#39. |
bf69efa to
19fca07
Compare
Contributor
Author
|
@eddyb: this is now ready to review. |
01c4882 to
e2de552
Compare
eddyb
approved these changes
Oct 21, 2020
Member
eddyb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me
Contributor
Author
|
I'll rebase on top of rust-lang/rustc-demangle#41 as soon as it's merged. |
e2de552 to
878c97e
Compare
Contributor
Author
|
@bors r=eddyb rollup |
Collaborator
|
📌 Commit 878c97e has been approved by |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 22, 2020
Rollup of 10 pull requests Successful merges: - rust-lang#77420 (Unify const-checking structured errors for `&mut` and `&raw mut`) - rust-lang#77554 (Support signed integers and `char` in v0 mangling) - rust-lang#77976 (Mark inout asm! operands as used in liveness pass) - rust-lang#78009 (Haiku: explicitly set CMAKE_SYSTEM_NAME when cross-compiling) - rust-lang#78084 (Greatly improve display for small mobile devices screens) - rust-lang#78155 (Fix two small issues in compiler/rustc_lint/src/types.rs) - rust-lang#78156 (Fixed build failure of `rustfmt`) - rust-lang#78172 (Add test case for rust-lang#77062) - rust-lang#78188 (Add tracking issue number for pin_static_ref) - rust-lang#78200 (Add `ControlFlow::is_{break,continue}` methods) Failed merges: r? `@ghost`
16 tasks
bors
added a commit
that referenced
this pull request
Nov 11, 2025
…ngling-scheme, r=wesleywiser sess: default to v0 symbol mangling on nightly cc #60705 rust-lang/compiler-team#938 Rust's current mangling scheme depends on compiler internals; loses information about generic parameters (and other things) which makes for a worse experience when using external tools that need to interact with Rust symbol names; is inconsistent; and can contain `.` characters which aren't universally supported. Therefore, Rust has defined its own symbol mangling scheme which is defined in terms of the Rust language, not the compiler implementation; encodes information about generic parameters in a reversible way; has a consistent definition; and generates symbols that only use the characters `A-Z`, `a-z`, `0-9`, and `_`. Support for the new Rust symbol mangling scheme has been added to upstream tools that will need to interact with Rust symbols (e.g. debuggers). This pull request changes the default symbol mangling scheme from the legacy scheme to the new Rust mangling scheme on nightly. The following pull requests implemented v0 mangling in rustc (if I'm missing any, let me know): - #57967 - #63559 - #75675 - #77452 - #77554 - #83767 - #87194 - #87789 Rust's symbol mangling scheme has support in the following external tools: - `binutils`/`gdb` (GNU `libiberty`) - [[PATCH] Move rust_{is_mangled,demangle_sym} to a private libiberty header. ](https://gcc.gnu.org/pipermail/gcc-patches/2019-June/523011.html) committed as gcc-mirror/gcc@979526c - [[PATCH] Simplify and generalize rust-demangle's unescaping logic. ](https://gcc.gnu.org/pipermail/gcc-patches/2019-August/527835.html) committed as gcc-mirror/gcc@42bf58b - [[PATCH] Remove some restrictions from rust-demangle. ](https://gcc.gnu.org/pipermail/gcc-patches/2019-September/530445.html) committed as gcc-mirror/gcc@e1cb00d - [[PATCH] Refactor rust-demangle to be independent of C++ demangling. ](https://gcc.gnu.org/pipermail/gcc-patches/2019-November/533719.html) ([original submission](https://gcc.gnu.org/pipermail/gcc-patches/2019-October/532388.html)) committed as gcc-mirror/gcc@32fc371 - [[PATCH] Support the new ("v0") mangling scheme in rust-demangle. ](https://gcc.gnu.org/pipermail/gcc-patches/2020-November/558905.html) ([original submission](https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542012.html)) committed as gcc-mirror/gcc@8409649 - `lldb`/`llvm-objdump`/`llvm-nm`/`llvm-symbolizer`/`llvm-cxxfilt`/etc - llvm/llvm-project@7310403 - llvm/llvm-project@c8c2b46 - llvm/llvm-project@0a2d4f3 - Linux `perf` - `valgrind` - [Update demangler to support Rust v0 name mangling.](https://bugs.kde.org/show_bug.cgi?id=431306) #85530 (comment) contains a summary of the most recent crater run of the v0 mangling, and the remaining issues from that were fixed by #87194 (confirmed by follow-up crater run, #85530 (comment)). `@rustbot` label +T-compiler r? `@michaelwoerister`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-const-generics
Area: const generics (parameters and arguments)
F-const_generics
`#![feature(const_generics)]`
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Likely we want more tests, to check the output is correct too: however, I wasn't sure what kind of test we needed, so I just added one similar to that added in #77452 for now.
r? @eddyb